<%@ page language="java" import="java.util.*, com.zjut.zs.util.tools.*,com.zjut.zs.userinfo.manager.*, com.zjut.zs.userinfo.dao.*,
com.zjut.zs.user.manager.*, com.zjut.zs.user.dao.*,com.zjut.zs.userstatus.manager.*, com.zjut.zs.userstatus.dao.*,
com.zjut.an.config.manager.*, com.zjut.an.config.dao.*,com.zjut.an.util.tools.*,com.zjut.an.util.system.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">  
<meta name="renderer" content="webkit"> 
		<title>无标题文档</title>
		<link href="css/style.css" rel="stylesheet" type="text/css" />

<style type="text/css">
<!--
.select1 {
	border:1px solid #ccc;
	padding:8px;
	width:200px;
}
-->
</style>

	</head>
<%
AnConfigManager anconfig = (AnConfigManager) SpringContextUtil.getBean("AnConfigManager");
ZsHTMLCreat html = (ZsHTMLCreat) SpringContextUtil.getBean("ZsHTMLCreat");
ZsUserinfoManager uimanager = (ZsUserinfoManager) SpringContextUtil.getBean("ZsUserinfoManager");
ZsUserManager umanager = (ZsUserManager) SpringContextUtil.getBean("ZsUserManager");
ZsUserStatusManager smanager = (ZsUserStatusManager) SpringContextUtil.getBean("ZsUserStatusManager");
ZsUserinfo userinfo = new ZsUserinfo();
ZsUser user = null;
if(session.getAttribute("admin")!=null && request.getParameter("usId")!=null) {
	String usId = request.getParameter("usId");
	user = umanager.getData(usId);
} else if (session.getAttribute("zsUser")!=null) {
	user = (ZsUser)session.getAttribute("zsUser");	
}

if (user!=null) {
	userinfo.setZsUser(user);										
	List list = uimanager.getDataByInstance(1,1,null,null,userinfo).getObjects();
	if (list.size()>0) {
		userinfo = (ZsUserinfo)list.get(0);
	}
}
ZsUserStatus userStatus = smanager.getDataByUser(user);
 %>
<body>
<jsp:include page="zs_uservalidate.jsp" flush="true"/>
		<div class="place">
			<span>位置：</span>
			<ul class="placeul">
				<li><a href="index.jsp">首页</a></li>
				<li><a href="#">个人陈述</a></li>
			</ul>
		</div>
<div style="margin:50px;width:200px;float:right;"><%out.print(anconfig.getSingleConfigInfoByName("个人陈述填写需知")); %></div>
		 <form id="ff" name="add" role="form" class="form-horizontal" action="" method="post"> 
			<div class="formbody">

				<div class="formtitle"><span>个人陈述</span></div>

				<ul class="forminfo">
					<li><label>个人陈述</label><textarea name="inTc" id="inTc" cols="" rows="50" class="textinput" required style="height:500px;"><%=html.getInputString(userinfo.getInTc()) %></textarea><i>限制1000中文字符以内</i></li>

					<li class="clear"><label>&nbsp;</label>
					<input id="inId" name="inId" type="text" class="dfinput" value="<%if(null==userinfo.getInId()){out.print("");}else{out.print(userinfo.getInId());}; %>"  style="display:none;"/>
					<input id="zsUser.usId" name="zsUser.usId" type="text" class="dfinput" value="<%=userinfo.getZsUser().getUsId() %>"  style="display:none;"/>
					
					<%if(Status.SENDSTATUS_NULL.getStatus().equals(userStatus.getSendStatus()) || Status.SENDSTATUS_NO.getStatus().equals(userStatus.getSendStatus())){ %>
					<button type="submit" class="btn btn-primary btn-sm">保存</button>
					<%} else {%>
					<button type="submit" class="btndisable" disabled>已确认</button>
					<%} %>
					</li>
				</ul>

			</div>
			
			
		</form>

<script src="../plugins/assets/plugins/jquery-3.5.1.min.js" type="text/javascript"></script>  
<script src="../plugins/assets/plugins/jquery-validation-1.14.0/dist/jquery.validate.js" type="text/javascript"></script>
<script src="../plugins/assets/plugins/jquery-validation-1.14.0/dist/jquery.metadata.js" type="text/javascript"></script>
<script src="js/formvalidate.js" type="text/javascript"></script>
<script src="../admin/js/publicManager.js" type="text/javascript" charset="utf-8"></script> 
		
		<script type="text/javascript">

		var updateOneAction = '../zsUserinfoGrcs.action?randnum='+Math.floor(Math.random()*1000000);
			var loactionurl = 'zs_grcs.jsp';
			
		$(function(){
		    //jquery.validate
			$("#ff").validate({
				submitHandler: function() {
					//验证通过后 的js代码写在这里
					submitFormAdvance();
				}
			})				
		})
		
		 $(function(){
		  $("#inTc").keyup(function(){
		   var len = $(this).val().length;
		   if(len > 1000){
		    $(this).val($(this).val().substring(0,1000));
		   }
		  });
		 });
		</script>
	</body>

</html>